%p
  %h4 Notes:
  %a#pencil{:href=>"#"}
    %i.icon-pencil
    " [edit]"
    
#notes{"data-type"=>"wysihtml5", "data-pk"=>"#{@entity.entity_id}", :url=>"/change","data-toggle"=>"manual","data-original-title"=>"Enter notes"}= @entity.notes

:javascript
  $(function(){
    $('#notes').editable({
      url: '/change',
      title: 'Enter username' 
    });
    $('#pencil').click(function(e) {
      e.stopPropagation();
      e.preventDefault();
      $('#notes').editable('toggle');
    });
  });